function isPalindrome(nums){
        let newStr = '';
        for(let i=0;i<nums.length;i++){
            const code = nums.charCodeAt(i);
            if((code >= 65 && code <= 90) || (code >= 97 && code <= 122) || (code >= 48 && code <= 57)){
                newStr += nums.charAt(i).toLowerCase();
            }
        }
        for(let i=0;i<newStr.length;i++){
            if(newStr[i]!==newStr[newStr.length-i-1]){
                return false;
            }
        }
        return true;       
}

const testStr1 = "A man, a plan, a canal: Panama";
const testStr2 = "race a car";
console.log(isPalindrome(testStr1)); 
console.log(isPalindrome(testStr2)); 

a= [{
    name:"siva",
    age:20,

},
{
    name:"siva",
    age:20,

}]

//取a中的name
let b = a.map((item)=>{
    return item.name; 
})

//过滤
let c = a.filter((item)=>{
    return item.age>10; 
})
//如何实现对象的深拷贝

//取a中的name和age

